<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>数据分页</title>
		<link rel="stylesheet" href="../layui/css/layui.css" media="all" />
		<link rel="stylesheet" href="../css/public.css" media="all" />
		<link rel="stylesheet" href="../css/iconfont.css" media="all" />
			<script type="text/javascript" src="../layui/layui.js"></script>
	</head>
	<body>
				 
		<table class="layui-hide" id="test"></table>
		              
		          

		<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 --> 
		 
		<script>
		layui.use('table', function(){
		  var table = layui.table;
		  
		  table.render({
		    elem: '#test'
		    ,url:global_url+'/admin/novel/findNovelAll'
		    ,headers:{
		    	"Authorization":window.localStorage.getItem("token"),
		    	"Accept":"application/json, text/plain, */*",
		    	"Content-Type":"application/json;charset=utf-8"
		    }
		    ,request: {
			    pageName: 'pageNum' //页码的参数名称，默认：page
			    ,limitName: 'pageSize' //每页数据量的参数名，默认：limit
			  }
		    ,method:"GET"
		    ,cols: [[
		      {field:'id', width:80, title: 'ID', sort: true}
		      ,{field:'username', width:80, title: '用户名'}
		      ,{field:'sex', width:80, title: '性别', sort: true}
		      ,{field:'city', width:80, title: '城市'}
		      ,{field:'sign', title: '签名', minWidth: 150}
		      ,{field:'experience', width:80, title: '积分', sort: true}
		      ,{field:'score', width:80, title: '评分', sort: true}
		      ,{field:'classify', width:80, title: '职业'}
		      ,{field:'wealth', width:135, title: '财富', sort: true}
		    ]]
		    ,page: true
		  });
		});
		</script>
		
		
	</body>
	<script type="text/javascript" src="../js/vue.js"></script>
	<script type="text/javascript" src="../js/vue-resource.js"></script>
	<script type="text/javascript" src="../js/vue-interceptors.js"></script>


</html>
